home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 June / PCWorld_2007-06_cd.bin / zabezpeceni / pctools / avinstall.exe / {tmp} / shutdown.vbs < prev   
Text File  |  2005-12-20  |  313b  |  14 lines

  1. Sub ShutDown
  2.  nLogOff=0
  3.  nReboot=2
  4.  nForceLogOff=4
  5.  nForceReboot=6
  6.  nPowerDown=8
  7.  nForcePowerDown=12
  8.  Set oOS = GetObject("winmgmts:{(Shutdown)}").ExecQuery("Select * from Win32_OperatingSystem")
  9.  For Each oOperatingSystem in oOS
  10.   oOperatingSystem.Win32Shutdown(nForceReboot)
  11.  Next
  12. End sub
  13. ShutDown
  14.